/**
 * @name: 设备管理
 * @date: 2020-6-16
 */
import Layout from '@/layout'
import Narbar from '@/components/HeaderNar/index.vue'
import ThreeNar from '@/components/ThreeNar/index.vue'
const deviceRouter = {
	path: '/device',
	component: Narbar,
	redirect: '/device/unsold',
	meta: {
		title: '设备管理',
		icon: 'client',
	},
	children: [
		{
			path: 'unsold',
			name: 'unsold',
			component: () => import('@/layout/components/AppMain'),
			redirect: '/device/unsold/unsoldIndex',
			meta: {
				title: '未售设备',
			},
			children: [
				{
					path: 'unsoldIndex',
					name: 'unsoldIndex',
					hidden: true,
					component: () => import('@/views/device/unsold'),
					meta: {
						title: '未售设备',
					}
				},
				{
					path: 'addDevice',
					name: 'addDevice',
					hidden: true,
					component: () => import('@/views/device/unsold/addDevice'),
					meta: {
						title: '新增设备',
						activeMenu: '/device/unsold/unsoldIndex'
					}
				},
				{
					path: 'detail',
					name: 'detail',
					hidden: true,
					component: () => import('@/views/device/unsold/detail'),
					meta: {
						title: '设备详情',
						activeMenu: '/device/unsold/unsoldIndex'
					}
				},
			]
		},
		{
			path: 'soldOut',
			name: 'soldOut',
			component: () => import('@/views/device/soldOut'),
			meta: {
				title: '已售设备',
			},
		},
		{
			path: 'soldOut/detail',
			name: 'soldOutDetail',
			hidden: true,
			component: () => import('@/views/device/unsold/detail'),
			meta: {
				title: '设备详情',
				activeMenu: '/device/soldOut'
			}
		},
		{
			path: 'soldOut/edit',
			name: 'soldOutEdit',
			hidden: true,
			component: () => import('@/views/device/unsold/addDevice'),
			meta: {
				title: '设备编辑',
				activeMenu: '/device/soldOut'
			}
		},
		{
			path: 'codeManage',
			name: 'detail',
			component: () => import('@/layout/components/AppMain'),
			redirect: '/device/codeManage/codeManageIndex',
			meta: {
				title: '二维码管理',
			},
			children: [
				{
					path: 'codeManageIndex',
					name: 'codeManageIndex',
					component: () => import('@/views/device/codeManage/index'),
					meta: {
						title: '批量管理',
					}
				},
				{
					path: 'codeList',
					name: 'codeList',
					component: () => import('@/views/device/codeManage/codeList'),
					meta: {
						title: '二维码列表',
					}
				},
			]
		},
		{
			path: 'testCardManage',
			name: 'detail',
			component: () => import('@/views/device/testCardManage/index'),
			meta: {
				title: '测试卡管理',
			}
		},
		{
			path: 'breakdown',
			name: 'breakdown',
			component: () => import('@/views/device/breakdown'),
			meta: {
				title: '故障查询',
			}
		},
		{
			path: 'unusualFillRecord',
			name: 'unusualFillRecord',
			redirect: '/device/unusualFillRecord/recordIndex',
			component: () => import('@/layout/components/AppMain'),
			meta: {
				title: '异常加注记录',
			},
			children: [
				{
					path: 'recordIndex',
					name: 'recordIndex',
					hidden: true,
					component: () => import('@/views/device/unusualFillRecord'),
					meta: {
						title: '异常加注记录',
						activeMenu: '/device/unusualFillRecord/recordIndex'
					}
				},
				{
					path: 'detail',
					name: 'detail',
					hidden: true,
					component: () => import('@/views/device/unusualFillRecord/detail'),
					meta: {
						title: '加注订单详情',
						activeMenu: '/device/unusualFillRecord/recordIndex'
					}
				},
			]
		},
		{
			path: 'afterSold',
			name: 'afterSold',
			redirect: '/device/afterSold/afterSoldIndex',
			component: () => import('@/layout/components/AppMain'),
			meta: {
				title: '售后管理',
			},
			children: [
				{
					path: 'afterSoldIndex',
					name: 'afterSoldIndex',
					hidden: true,
					component: () => import('@/views/device/afterSold'),
					meta: {
						title: '售后管理',
					}
				},
				{
					path: 'addRepair',
					name: 'addRepair',
					hidden: true,
					component: () => import('@/views/device/afterSold/addRepair'),
					meta: {
						title: '添加维修记录',
						activeMenu: '/device/afterSold/afterSoldIndex'
					}
				},
				{
					path: 'detail',
					name: 'detail',
					hidden: true,
					component: () => import('@/views/device/afterSold/detail'),
					meta: {
						title: '维修记录详情',
						activeMenu: '/device/afterSold/afterSoldIndex'
					}
				},
			]
		},
		{
			path: 'deviceFee',
			name: 'deviceFee',
			redirect: '/device/unusualFillRecord/recordIndex',
			component: () => import('@/layout/components/AppMain'),
			meta: {
				title: '设备服务费',
			},
			children: [
				{
					path: 'expenseManage',
					name: 'expenseManage',
					component: () => import('@/views/device/deviceExpense/expenseManage'),
					meta: {
						title: '服务费管理',
						activeMenu: '/device/deviceFee'
					}
				},
				{
					path: 'feeOrder',
					name: 'feeOrder',
					component: () => import('@/views/device/deviceExpense/expenseBill'),
					meta: {
						title: '缴费单',
						activeMenu: '/device/deviceFee'
					},
				},
				{
					component: () => import('@/views/device/deviceExpense/billDetail'),
					path:'billDetail',
					name: 'billDetail',
					hidden: true,
					meta: {
						title: '缴费单详情',
						activeMenu: '/device/deviceFee'
					},
					activeMenu: '/device/deviceFee'
				}
			]
		}
	]
}
export default deviceRouter
